<template>
  <div class="all" v-if="show">
    <div class="title">
      课后习题
    </div>
    <div class="value">
      <div v-for="(item, index) in arry" class="section" :key="index">
        {{index+1}}.{{item}}
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    analysis: {
      type: String,
      default: ''
    }
  },
  data () {
    return {
      arry: [],
      show: false
    }
  },
  watch: {},
  computed: {},
  methods: {},
  created () {},
  mounted () {
    this.arry = this.analysis.split("。")
    if(this.analysis.split("。")[0]){
      this.show = true
    }
  }
}
</script>
<style scoped>
.title{
  text-align: center;
}
.all{
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 10px;
  box-sizing: border-box;
  background-color: rgb(48, 10, 83);
  box-shadow: 5px 5px 10px grey;
  color: rgb(210, 203, 216)
}
.section{
  margin-top: 10px;
  font-size: 2.3vh;
  line-height: 4vh;
}
.value{
  padding-bottom: 10px;
}
</style>


